package com.example.springboot.ytest.ytest;

import java.util.concurrent.ConcurrentHashMap;

import org.springframework.util.StringUtils;

/**
 * 测试 org.springframework.util.StringUtils 功能
 * @author yeyi771
 */
public class StringUtilsTest {
    public static void delimitedListToStringArray(){
        
        String str = "123,345,abc";
        String delimiter = ",";
        String charsToDelete = "3";
        String []a = StringUtils.delimitedListToStringArray(str, delimiter, charsToDelete);
        for(String s: a){
            System.out.println(s);
        }
        System.out.println("---------------------------");
        delimiter = "";
        a = StringUtils.delimitedListToStringArray(str, delimiter, charsToDelete);
        for(String s: a){
            System.out.println(s);
        }
    }
    
    public static void cleanPath(){
        String path = "D:/code/java/../java/./workspace_iflashbuy_new/iflashbuy-admin/admin_web";
        String s = StringUtils.cleanPath(path);
        System.out.println(s); // D:/code/java/workspace_iflashbuy_new/iflashbuy-admin/admin_web
    }
    
    public static void main(String[] args) {
//        delimitedListToStringArray();
        cleanPath();
        ConcurrentHashMap map;
    }
}
